import {deleteAction, getAction, postAction} from "@/api/manage";

export const getCheckCode = (email) => getAction("/user/check?EMAIL=" + email)
//注册
// export const signUpByEmail = (data) => postAction("/user/signup", data)

// 登录
export const login = (data) => postAction("/user/login", data);

//身份确认
export const id_define = () => getAction("/user/id");

//获取分页内容
export const getPage = (pageNum, type) => getAction("/" + type +"/list?pageNum=" + pageNum + "&pageSize=10");

//获取总页数
export const getSum = (type) => getAction("/" + type + "/pages?size=10");

//按照id删除
export const delObjectById = (id, type) => deleteAction("/" + type + "/del?id=" + id);

//按照种类时间进行查找
export const selectByTypeAndDate = (type, date, point) => getAction("/" + point + "/getByTypeAndDate?type=" + type + "&date=" + date);

//添加用户或结果
export const addObject = (data, type) => postAction("/" + type + "/add", data);

//用户登出
export const userLogout = () => postAction("/user/logout");

//根据老师请求所有未审批的成果
export const getResForTeacher = () => getAction("/result/getForTeacher");

//根据老师找到老师的学生
export const getTeacherStudent = () => getAction("/user/getStuForTeacher");

//评价结果
export const reviewResult = (data) => postAction("/result/review", data);

export const updateResult = (data) => postAction("/result/update", data);

export const updateUser = (data) => postAction("/user/update", data);

//获取学生的成果
export const getForUser = () => getAction("/result/getForUser");
